package pl.edu.uj.tcs.blef.protocol;

/**
 * Client-Server protocol request /create-table implementation.
 * @author Maciej Bendkowski
 *
 */
public final class CreateTableRequest extends Request {	
	/**
	 * Default private constructor.
	 * @param message The actual message.
	 * @param handler The default handler.
	 */
	CreateTableRequest(String message, RequestHandler handler) {
		super(message, handler);
		fill();
	}

	@Override
	protected void fill() {
		this.tableName = message.split(" ")[1];
		this.playerNick = message.split(" ")[2];
	}

	/**
	 * Requested table name.
	 * @uml.property  name="tableName" readOnly="true"
	 */
	private String tableName;

	/**
	 * Getter of the property <tt>tableName</tt>
	 * @return  Returns the tableName.
	 * @uml.property  name="tableName"
	 */
	public String getTableName() {
		return tableName;
	}

	/**
	 * Requested player nick.
	 * @uml.property  name="playerNick" readOnly="true"
	 */
	private String playerNick;

	/**
	 * Getter of the property <tt>playerNick</tt>
	 * @return  Returns the playerNick.
	 * @uml.property  name="playerNick"
	 */
	public String getPlayerNick() {
		return playerNick;
	}
}
